let fs = require('fs');
let app = require('../src/index');

let testEvent = JSON.parse(fs.readFileSync('../test/data/TrickTeaching.json', 'utf-8'));
let context = {

    System: {
        application: {
            "applicationId": "amzn1.ask.skill.2bb8bbfd-cb3e-431c-84aa-9c8d6aadeb99"
        },
        user: {
            userId: "amzn1.ask.account.AHLGTVIKJ2SX572DE4TXRHHVTGK24ZBJCDV4JRXWO5WWKRZB62EVJGVKS3NJZZLLVBP24E27PAERWCKOSDBXOAAYTPOMV6F4MTNWYWKEGC5JQ47FJHCBY5HPBO4AZ72ZT5WFRGWAITMBNNBHVFTLYTWYJ7P3UUL3XRLSECRFGJ2O6ANBXO2CJXIDNW3QZ7QEWACDSUPMYTGHBQQ"
        },
        device: {
            deviceId: "amzn1.ask.device.AF2L6V5FOBM5TPWCXOAZE3DT6HBTADFSRVBNC5QGW3GBO4GCQKY5Z2N63KQDGYLLTUHMIMANLDMCIEPPIFAWXD6DAZRRVC3K3OWWBKMQXK4CAHPGXWYYEMCHGSMUJQAJHOBZCUMCY66M64U3PJXVZJLHN3OVH6XMWE4JGL4BZXXN7PVQFECYG",
            supportedInterfaces: {
                Display: {},
                AudioPlayer: {},
                VideoApp: {}
            }
        },
        apiEndpoint: "https://api.amazonalexa.com",
        apiAccessToken: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJhdWQiOiJodHRwczovL2FwaS5hbWF6b25hbGV4YS5jb20iLCJpc3MiOiJBbGV4YVNraWxsS2l0Iiwic3ViIjoiYW16bjEuYXNrLnNraWxsLjJiYjhiYmZkLWNiM2UtNDMxYy04NGFhLTljOGQ2YWFkZWI5OSIsImV4cCI6MTUzNjY3Nzk1NywiaWF0IjoxNTM2Njc0MzU3LCJuYmYiOjE1MzY2NzQzNTcsInByaXZhdGVDbGFpbXMiOnsiY29uc2VudFRva2VuIjpudWxsLCJkZXZpY2VJZCI6ImFtem4xLmFzay5kZXZpY2UuQUYyTDZWNUZPQk01VFBXQ1hPQVpFM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